package com.example.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.pay.domain.UserPayRecordOut;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
* @author CETC
* @description 针对表【user_pay_record_out_1】的数据库操作Mapper
* @createDate 2025-11-01 22:17:31
* @Entity com.example.pay.domain.UserPayRecordOut1
*/
public interface UserPayRecordOutMapper extends BaseMapper<UserPayRecordOut> {

    @Select("<script>" +
            "   SELECT * FROM  ${tableName}  WHERE from_uuid=#{userId} order by pay_date desc" +
            "</script>")
    IPage<UserPayRecordOut> page(Page<UserPayRecordOut> page, @Param("tableName")String tableName, @Param("userId")String userId);

    @Select("SELECT * FROM ${tableName} WHERE  uuid=#{uuid}")
    UserPayRecordOut getById(@Param("tableName")String tableName,@Param("uuid")String id);
}




